package org.jsbd.boss.dao.impl;

import java.util.List;

import org.jsbd.boss.dao.IBrushConfigDao;
import org.jsbd.boss.domian.channel.BrushApkConfig;
import org.jsbd.boss.domian.channel.BrushConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

@Service
public class BrushConfigDaoImpl extends CrackBaseDao implements IBrushConfigDao {
	public static final Logger LOGGER = LoggerFactory.getLogger(BrushConfigDaoImpl.class);

	@Override
	public void insertBrushConfig(BrushConfig config) {
		super.insert("qy_brush_config.INSERT_BRUSH_CONFIG", config);
	}

	@Override
	public void insertBrushHistoryConfig(BrushConfig config) {
		super.insert("qy_brush_config.INSERT_BRUSH_CONFIG_HISTORY", config);
	}

	@Override
	public void updateBrushHistoryConfig(BrushConfig config) {
		super.update("qy_brush_config.UPDATE_BRUSH_CONFIG_HISTORY", config);
	}


	@Override
	public void deleteBrushConfig(BrushConfig config) {
		super.delete("qy_brush_config.DELETE_BRUSH_CONFIG", config);
	}

	@Override
	public Integer countBrushConig(BrushConfig config) {
		return super.queryForCount("qy_brush_config.COUNT_BRUSH_LIST", config);
	}

	@Override
	public List<BrushConfig> selectList(BrushConfig config) {
		return super.queryForList("qy_brush_config.SELECT_LIST", config);
	}

	@Override
	public BrushConfig selectConfig(BrushConfig config) {
		return (BrushConfig) super.queryForObject("qy_brush_config.SELECT_CONFIG", config);
	}
	
	@Override
	public void updateBrushConfig(BrushConfig config) {
		super.update("qy_brush_config.UPDATE_BRUSH_CONFIG", config);
	}

	@Override
	public void saveCheck(BrushApkConfig config) {
		super.update("qy_brush_config.UPDATE_BRUSH_CHECK", config);
	}

	@Override
	public BrushConfig selectById(Integer id) {
		return (BrushConfig) super.queryForObject("qy_brush_config.SELECT_BY_ID", id);
	}
}
